<?php
Class TaskController extends Controller{

	public function show($id){
		$task = $this->loader->model('task');
		$task->SelectTaskFromSql($id);
		$this->smarty->assign('task', $task);
		$this->smarty->assign('title', 'Kémia éve - Feladatok');
	}
	
	public function showallfromsheet($sheet_id){
		$task = $this->loader->model('task');
		$tasks = $task->SelectAllTaskFromSheet($sheet_id);
		$taskcount = count($tasks);
		$this->smarty->assign('tasks', $tasks);
		$this->smarty->assign('taskcount', $taskcount);
		$this->smarty->assign('title', 'Kémia éve - Feladatok');
	}
	
	public function newtask(){
		$task = $this->loader->model('task');
		///////
		///////
		///////
		$this->smarty->assign('task', $task);
		$this->smarty->assign('title', 'Kémia éve - Új Feladat');
	}
	
	public function edit($id){
		$task = $this->loader->model('task');
		///////
		///////
		///////
		$this->smarty->assign('task', $task);
		$this->smarty->assign('title', 'Kémia éve - Feladat Módosítása');
	}

	public function delete($id){
		$task = $this->loader->model('task');	
		///////
		///////
		///////
		$this->smarty->assign('task', $task);
		$this->smarty->assign('title', 'Kémia éve - Feladat Törlése');
	}	
		
}
?>